﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="register.aspx.cs" Inherits="OF.Web.admin.register" %>

<!DOCTYPE HTML>
<html>
<head>
    <title>下馆子商户注册</title>
    <link href="res/css/login.css" rel="stylesheet">
    <script type="text/javascript" src="res/js/jquery-1.8.0.min.js"></script>
    <style>
        body {
            background: url(http://dfb365-qd.oss-cn-qingdao.aliyuncs.com//resources/img/login_bg.jpg) no-repeat center center;
            background-size: cover;
        }
    </style>
</head>
<body>

    <div class="page">
        <div class="box">
            <div class="login_box">
                <form id="Form1" runat="server">
                    <h2><font style="color:green">下馆子商户注册</font> &nbsp;&nbsp;&nbsp;<a href="login.aspx" style="color:white">登录</a></h2>
                    <div class="form_line">
                        <label for="username">
                            账号：</label>
                        <asp:TextBox ID="txtloginname" runat="server" CssClass="ipt" MaxLength="11" onfocus="if (this.value=='请输入手机号'){this.value='';}" onblur="if (this.value==''){this.value='请输入手机号';}" value="请输入手机号"></asp:TextBox>
                    </div>
                    <div class="form_line">
                        <label for="password">
                            密码：</label>
                        <asp:TextBox ID="txtpwd" runat="server" CssClass="ipt" TextMode="Password" MaxLength="20"></asp:TextBox>
                    </div>
                    <div class="form_line">
                        <label for="password">
                            确认：</label>
                        <asp:TextBox ID="txtpwd2" runat="server" CssClass="ipt" TextMode="Password" MaxLength="20"></asp:TextBox>
                    </div>
                    <div class="form_line">
                        <asp:Button ID="btnSave" runat="server" OnClick="btnSave_Click" CssClass="btn" Text="注册" OnClientClick="return reg()" />
                    </div>
                    <div class="form_line">
                        <div class="tip" id="tip" runat="server">
                            &nbsp;&nbsp;&nbsp;
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>

    <script>
        $(function () {
            $('.ipt').focusin(function () {
                $(this).addClass('focus');
                $('#tip').text('').hide();
            });
            $('.ipt').focusout(function () {
                $(this).removeClass('focus');
                $('#tip').text('').hide();
            });

            $('.btn').hover(function () {
                $(this).addClass('hover');
            }, function () {
                $(this).removeClass('hover');
            });
        });

        function reg() {
            if ($.trim($('#txtloginname').val()) == '') {
                $('#tip').text('请输入账号').show();
                return false;
            }
            if ($.trim($('#txtpwd').val()) == '') {
                $('#tip').text('请输入密码').show();
                return false;
            }
            if ($.trim($('#txtpwd').val()).length < 6) {
                $('#tip').text('密码必须大于6位').show();
                return false;
            }
            if ($.trim($('#txtpwd').val()) != $.trim($('#txtpwd2').val())) {
                $('#tip').text('密码和确认密码不一致').show();
                return false;
            }
            $('#tip').text('').hide();
        }
</script>
</body>
</html>
